package com.jeeit.banana.mdm.api.client;

import com.jeeit.banana.mdm.api.entity.dict.SysDictItem;
import com.jeeit.banana.common.constant.ServiceNameConstants;
import com.jeeit.banana.common.util.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * @author liuer
 * @date 2023/02/20
 * <p>
 * 查询参数相关
 */
@FeignClient(contextId = "dictApi", value = ServiceNameConstants.MDM_SERVICE)
public interface DictApi {

	/**
	 * 通过字典类型查找字典
	 * @param type 字典类型
	 * @return 同类型字典
	 */
	@GetMapping("/dict/type/{type}")
	R<List<SysDictItem>> getDictByType(@PathVariable("type") String type);

}
